<template>
  <div class="block-password">
    <h2 style="margin: 30px 200px">修改密码</h2>
    <el-form
        ref="ruleFormRef"
        :model="ruleForm"
        status-icon
        :rules="rules"
        label-width="120px"
        class="demo-ruleForm"
    >
      <el-form-item label="旧密码：" prop="OldPassword">
        <el-input class="el-input__wrapper1" v-model="ruleForm.OldPass" />
      </el-form-item>
      <el-form-item label="新密码：" prop="pass">
        <el-input class="el-input__wrapper1" v-model="ruleForm.NewPass"  autocomplete="off" />
      </el-form-item>
      <el-form-item label="确认新密码：" prop="checkPass">
        <el-input class="el-input__wrapper1" v-model="ruleForm.ConfirmNewPass" autocomplete="off"/>
      </el-form-item>
      <el-form-item class="body-bottom">
        <el-button class="button" type="primary" @click="submitForm(ruleFormRef)">确定</el-button>
        <el-button @click="resetForm">清空</el-button>
      </el-form-item>
    </el-form>
  </div>

</template>

<script setup lang="ts">
import { reactive, ref } from 'vue'
import type { FormInstance } from 'element-plus'

const ruleFormRef = ref<FormInstance>()

const ruleForm = reactive({
  OldPass: '',
  NewPass: '',
  ConfirmNewPass: '',
})

const submitForm = (formEl: FormInstance | undefined) => {

}

const resetForm = () => {
  ruleForm.OldPass='',
      ruleForm.NewPass='',
      ruleForm.ConfirmNewPass=''
}
</script>


<style scoped>
/*内容最大div*/
.block-password{
  margin-top: 100px;
  padding: 0px 70px;
  margin-left: 200px;
}
/*最大盒子*/
.el-main{
  display: flex;
  justify-content: center;
}
/*内容input*/
.el-input__wrapper1{
  width: 300px;
  height: 35px;
}
.el-button{
  margin: 0px 35px;
}
/*确定按钮*/
.button{
  background: #42b983;
  border: 1px solid #42b983;
}


</style>